<?php

namespace App\Common\Dao\System;

use App\Common\Dao\BaseDao;
use App\Model\CustomerLogLogin;
use App\Model\CustomerLogOperate;

class CustomerLogOperateDao extends BaseDao
{
    protected function getModel(): CustomerLogOperate
    {
        return new CustomerLogOperate();
    }

    public function search($where){
        return CustomerLogOperate::when(isset($where['creator_id']) && $where['creator_id'] != ''  , function ($query) use ($where) {
            $query->where('creator_id', $where['creator_id']);
        });
    }
}